package model

import (
	"gorm.io/gorm"
	"time"
)

type Comment struct {
	Id        uint           `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
	UserId    uint           `gorm:"column:user_id;type:bigint(20) UNSIGNED;not null;default:0;" json:"user_id"`
	GoodsId   uint           `gorm:"column:goods_id;type:bigint(20) UNSIGNED;not null;default:0;" json:"goods_id"`
	Message   string         `gorm:"column:message;type:varchar(255);not null;" json:"message"`
}

func (c *Comment) TableName() string {
	return "comment"
}
